package com.kakarote.ids.provider.entity.VO;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.kakarote.common.entity.SimpleUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel("部门VO")
public class IdsDeptVO {
    @ApiModelProperty("部门ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deptId;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("上级部门")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    @ApiModelProperty("备注")
    private String description;

    @ApiModelProperty("用户池ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long poolId;

    @ApiModelProperty("是否是主部门（0否 1是）")
    private Integer isMainDept;

    @ApiModelProperty("是否是负责人（0否 1是）")
    private Integer isLeader;

    @ApiModelProperty("下级部门列表")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<IdsDeptVO> children;

    @ApiModelProperty("部门下员工列表")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<SimpleUser> userList;

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setPoolId(Long poolId) {
        this.poolId = poolId;
    }

    public void setIsMainDept(Integer isMainDept) {
        this.isMainDept = isMainDept;
    }

    public void setIsLeader(Integer isLeader) {
        this.isLeader = isLeader;
    }

    public void setChildren(List<IdsDeptVO> children) {
        this.children = children;
    }

    public void setUserList(List<SimpleUser> userList) {
        this.userList = userList;
    }


    protected boolean canEqual(Object other) {
        return other instanceof IdsDeptVO;
    }

    public String toString() {
        return "IdsDeptVO(deptId=" + getDeptId() + ", deptName=" + getDeptName() + ", parentId=" + getParentId() + ", description=" + getDescription() + ", poolId=" + getPoolId() + ", isMainDept=" + getIsMainDept() + ", isLeader=" + getIsLeader() + ", children=" + getChildren() + ", userList=" + getUserList() + ")";
    }

    public Long getDeptId() {
        return this.deptId;
    }

    public String getDeptName() {
        return this.deptName;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public String getDescription() {
        return this.description;
    }

    public Long getPoolId() {
        return this.poolId;
    }

    public Integer getIsMainDept() {
        return this.isMainDept;
    }

    public Integer getIsLeader() {
        return this.isLeader;
    }

    public List<IdsDeptVO> getChildren() {
        return this.children;
    }

    public List<SimpleUser> getUserList() {
        return this.userList;
    }
}
